<style>
    .defectDetailInfo {
        width: 480px;
        margin: 5px auto;
    }
    .defectDetailInfo tr {
        height: 27px;
    }
    .defectDetailInfo td {
        text-indent: 3px;
    }
    .defectDetailInfo input[readonly="readonly"] {
        border: none !important;
    }
    .defectInfoPageContent {
        width: 530px !important;
    }
</style>
<div class="pageContent defectInfoPageContent" >
    <div style="width: 520px; margin: 5px auto;  border: 1px solid #D8DFE5; padding: 5px auto; height: 279px; overflow-y: auto;">
        <table class="defectDetailInfo" >
            <tr>
                <td style="width: 80px;"><label><@label key="defectCode.C,colon">缺陷编号：</@label></label></td>
                <td style="width: 170px;"><input readonly="readonly" type="text" value="${defect.defectCode}" /></td>
                <td style="width: 80px;"><label><@label key="defectText.C,colon">缺陷描述：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if defect.defectText != 'null'>${defect.defectText!''}</#if>" /></td>
            </tr>
            <tr>
                <td><label><@label key="defectType.C,colon">缺陷类型：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if defect.defectTypeText != 'null'>${defect.defectTypeText!''}</#if>" /></td>
                <td><label><@label key="defectNum.C,colon">缺陷数量：</@label></label></td>
                <td><input readonly="readonly" type="text" value="${inspectRecord.quantity!0}" /></td>
            </tr>
            <tr>
                <td><label><@label key="repairmethod.C,colon">返修方法：</@label></label></td>
                <td colspan="3">
                    <input style="width: 385px;" readonly="readonly" type="text" value="<#if defect.repairmethodText != 'null'>${defect.repairmethodText!''}</#if>" /></td>
            </tr>
            <tr>
                <td><label><@label key="workCenter.C,colon">工作中心：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if inspectRecord.workcenterText != 'null'>${inspectRecord.workcenterText!''}</#if>" /></td>
                <td><label><@label key="workUnit.C,colon">作业单元：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if inspectRecord.workunitText != 'null'>${inspectRecord.workunitText!''}</#if>" /></td>
            </tr>
            <tr>
                <td><label><@label key="qmOperation.C,colon">质检工序：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if inspectRecord.operationText != 'null'>${inspectRecord.operationText!''}</#if>" /></td>
                <td><label><@label key="defectRecorder.C,colon">检验人：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if inspectRecord.createUser != 'null'>${inspectRecord.createUser!''}</#if>" /></td>
            </tr>
            <tr>
                <td><label><@label key="inspectDateTime.C,colon">检验时间：</@label></label></td>
                <td><input readonly="readonly" type="text" value='${(inspectRecord.createDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}' /></td>
                <td colspan="2">
                    <#if inspectRecord.attachments ?? && inspectRecord.attachments?size gt 0>
                        <a id="attachmentInfo_link" style="height: 25px; line-height: 25px; float: left; color: #3636CC; cursor: pointer;"><@label key="attachment.C">附件</@label>(${inspectRecord.attachments?size})</a>
                        <script type="text/javascript">
                            $('#attachmentInfo_link', $.pdialog.getCurrent()).on('click', function(){
                                var id = '${inspectRecord.id}', attachmentInfo = '<@label key="attachmentInfo.C">附件信息</@label>';
                                $.pdialog.open(hostUrl + "/defectGraph/attachmentInfo_search", "INSPECT_ATTACHMENT_INFO", attachmentInfo, {data: {inspectRecordId: id}, mask: true, width: 700, height: 400, resizable: false});
                                return false;
                            });
                        </script>
                    </#if>
                </td>
            </tr>
        </table>
        <div style="margin: 10px auto; width: 480px; border: 1px solid #D8DFE5; height: 90px;">
            <table class="table canopration" style="width: 480px;">
                <thead>
                    <tr>
                        <th style="width: 200px;"><@label key="attributeText.C">属性描述</@label></th>
                        <th><@label key="attributeValue.C">属性值</@label></th>
                    </tr>
                </thead>
                <tbody>
                <#list defect.defectAttributeValue as defectAttribute>
                    <tr>
                        <td>${defectAttribute.attributeText}</td>
                        <td>${defectAttribute.attributeValue}</td>
                    </tr>
                </#list>
                </tbody>
            </table>
        </div>
    </div>
    <div style="width: 520px; margin: 5px auto;  border: 1px solid #D8DFE5; padding: 5px auto;">
        <table class="defectDetailInfo" >
            <tr>
                <td style="width: 80px;"><label><@label key="orderFormNum.C,colon">订单编号：</@label></label></td>
                <td style="width: 170px;"><input readonly="readonly" type="text" value="${orderDetail.productionOrderNum}" /></td>
                <td style="width: 80px;"><label><@label key="orderStatus.C,colon">订单状态：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if orderDetail.statuseText != 'null'>${orderDetail.statuseText!''}</#if>" /></td>
            </tr>
            <tr>
                <td><label><@label key="materialCode.C,colon">物料编号：</@label></label></td>
                <td><input readonly="readonly" type="text" value="${orderDetail.materialCode}" /></td>
                <td><label><@label key="materialText.C,colon">物料描述：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if orderDetail.materialText != 'null'>${orderDetail.materialText!''}</#if>" /></td>
            </tr>
            <tr>
                <td><label><@label key="orderQuantity.C,colon">订单数量：</@label></label></td>
                <td><input readonly="readonly" type="text" value="${orderDetail.plannedQuantity}" /></td>
                <td><label><@label key="workCenter.C,colon">工作中心：</@label></label></td>
                <td><input readonly="readonly" type="text" value="<#if orderDetail.workCenterText != 'null'>${orderDetail.workCenterText!''}</#if>" /></td>
            </tr>
            <tr>
                <td><label><@label key="operationDate.C,colon">投产日期：</@label></label></td>
                <td><input readonly="readonly" type="text" value='${(orderDetail.actualstartDateTime?string("yyyy-MM-dd HH:mm:ss"))?if_exists}' /></td>
                <td><label><@label key="cmprocess_code.C,colon">工艺编号：</@label></label></td>
                <td><input readonly="readonly" type="text" value="${orderDetail.processCode}" /></td>
            </tr>
        </table>
    </div>
</div>
<div class="formBar" style="width: 521px; margin: 0px auto;">
    <ul>
        <li>
            <div class="buttonActive">
                <div class="buttonContent">
                    <button type="button" class="close">
                    <@label    key="close.B">关闭</@label></button>
                </div>
            </div>
        </li>
    </ul>
</div>